<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	<ui:composition template="/views/layouts/main.xhtml">
	<ui:define name="content">
		<h:form id="formPrincipal">
			<div class="grid_18">
				<div class="grid_6">
					<util:home action="#{impressaoBean.goHome}" />
					<p:commandButton type="button" value="#{i18n.btn_Buscar}" 
						icon="ui-icon ui-icon-search" onclick="dialogoBuscaProjeto.show()" />
				</div>
				<util:titulo value="#{i18n.TituloImpressaoDescricao}" />
				<div class="grid_1">
					<util:help />
				</div>
			</div>
		
			<div class="grid_18" id="div-messages">
				<p:messages id="messages" closable="true" />
			</div>
		
			<util:label value="#{i18n.ImpressaoDescricaoEstendida_Cliente}" />
			<div class="grid_18">
				<p:inputText value="#{impressaoBean.pInstance.clienteProjeto.nomeCompleto}" 
					styleClass="width_18" disabled="true"/>
			</div>
			
			<util:label value="#{i18n.ImpressaoDescricaoEstendida_CodigoProjeto}" grid="5"/>
			<util:label value="#{i18n.ImpressaoDescricaoEstendida_NomeProjeto}" grid="13"/>
			<div class="grid_5">
				<p:inputText value="#{impressaoBean.pInstance.codigo}" styleClass="width_4" disabled="true" />
			</div>
			<div class="grid_13">
				<p:inputText value="#{impressaoBean.pInstance.nome}" styleClass="width_13" disabled="true" />
			</div>
			
			<div class="grid_18">
				<br/>
				<p:dataTable id="dtDescricoes" widgetVar="dtDescricoes" value="#{impressaoBean.deList}"
					var="model" paginator="true" lazy="true" dynamic="true" 
					paginatorPosition="#{contextoBean.paginatorPosition}" 
					rows="#{contextoBean.dataTableRows}" paginatorTemplate="#{contextoBean.paginatorTemplate}"
					rowsPerPageTemplate="#{contextoBean.rowsPerPage}">
					<f:facet name="header">
						<h:outputText value="Descrições Estendidas" style="float:left" /> 
					</f:facet>
					<p:column headerText="#{i18n.Impressao_Codigo}" sortBy="#{model.codigo}">
						<h:outputText value="#{model.codigo}" />
					</p:column>
					<p:column headerText="#{i18n.Impressao_Nome}" sortBy="#{model.nome}">
						<h:outputText value="#{model.nome}" />
					</p:column>
					<p:column headerText="#{i18n.Ator_Acoes}" style="width:40px;">
						<p:commandButton icon="ui-icon ui-icon-print" ajax="false"
							process="@this" action="#{impressaoBean.imprimirDescricao(model.id)}" />
					</p:column>
				</p:dataTable>
			</div>
		</h:form>
		<ui:include src="/views/impressao/_dialogoBuscaProjeto.xhtml" />
	</ui:define>
	</ui:composition>
</f:view>